package com.nf.db.handlers.list;

import com.nf.db.handlers.ResultSetHandler;

import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import static com.nf.db.handlers.RowProcessor.DEFAULT_ROWPROCESSOR;

/*
 * 让ResultSetHandler处理结果集，并将结果集转换为List<Object[]>
 * */
public class ArrayListHandler extends AbstractListHandler<Object[]> {
    @Override
    protected Object[] handlerRow(ResultSet rs) throws SQLException {
        return DEFAULT_ROWPROCESSOR.toArray(rs);
    }
}
